﻿Echo Now building the id-sharepoint solution
Echo cd
makecab /f Solution\cab.ddf

if [%1] == [] GOTO Default
SET Url=%1
GOTO Start:

:Default
SET Url=http://rdmis

:Start

Echo Setting paths
@SET SPDIR="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12"
@SET TEMPLATEDIR="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\Template"
@SET STSADM="C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin\stsadm"

Echo Attempting to retract previous solution
%STSADM% -o retractsolution -name  id-sharepoint.wsp -immediate -url %Url%
%STSADM% -o execadmsvcjobs

Echo Deleting previous solution
%STSADM% -o deletesolution -name  id-sharepoint.wsp -override 
%STSADM% -o execadmsvcjobs

Echo adding solution
%STSADM% -o addsolution -filename  Package\id-sharepoint.wsp  
%STSADM% -o execadmsvcjobs

Echo Deploying solution to farm
%STSADM% -o deploysolution -name  id-sharepoint.wsp -immediate -allowgacdeployment -url %Url% -allowcaspolicies -force
%STSADM% -o execadmsvcjobs
